package com.health.viewscontrols.focusgroup;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.Toast;

import com.health.R;
import com.health.viewscontrols.NovaActivity;
import com.health.viewscontrols.tijian.ZYTZ_WenJuanActivity;

import java.util.Random;

/**
 * 中医体质快速识别
 * Created by John on 2019/1/10.
 */

public class KuaiSuShiBieActivity extends NovaActivity {
    private TextView title;
    private Button btn_back;
    public static Button btn_up;

    private Button wenJuanButton;// 体质辨识问卷
    private Button resetButton;// 重置

    // RadioGroup
    RadioGroup pinghe;
    RadioGroup qixu;
    RadioGroup yangxu;
    RadioGroup yinxu;
    RadioGroup tanshi;
    RadioGroup shire;
    RadioGroup xueyu;
    RadioGroup qiyu;
    RadioGroup tebing;

    // result radioButton;
    RadioButton result_qixuzhi_1;
    RadioButton result_qixuzhi_2;
    RadioButton result_yangxuzhi_1;
    RadioButton result_yangxuzhi_2;
    RadioButton result_yinxuzhi_1;
    RadioButton result_yinxuzhi_2;
    RadioButton result_tanshizhi_1;
    RadioButton result_tanshizhi_2;
    RadioButton result_shirezhi_1;
    RadioButton result_shirezhi_2;
    RadioButton result_xueyuzhi_1;
    RadioButton result_xueyuzhi_2;
    RadioButton result_qiyuzhi_1;
    RadioButton result_qiyuzhi_2;
    RadioButton result_tebingzhi_1;
    RadioButton result_tebingzhi_2;
    RadioButton result_pinghezhi_1;
    RadioButton result_pinghezhi_2;

    //问题一
    RadioGroup ques1_group;
    RadioButton ques1_1;
    RadioButton ques1_2;
    RadioButton ques1_3;
    RadioButton ques1_4;
    RadioButton ques1_5;
    //问题二
    RadioGroup ques2_group;
    RadioButton ques2_1;
    RadioButton ques2_2;
    RadioButton ques2_3;
    RadioButton ques2_4;
    RadioButton ques2_5;
    //问题三
    RadioGroup ques3_group;
    RadioButton ques3_1;
    RadioButton ques3_2;
    RadioButton ques3_3;
    RadioButton ques3_4;
    RadioButton ques3_5;
    //问题四
    RadioGroup ques4_group;
    RadioButton ques4_1;
    RadioButton ques4_2;
    RadioButton ques4_3;
    RadioButton ques4_4;
    RadioButton ques4_5;
    //问题五
    RadioGroup ques5_group;
    RadioButton ques5_1;
    RadioButton ques5_2;
    RadioButton ques5_3;
    RadioButton ques5_4;
    RadioButton ques5_5;
    //问题六
    RadioGroup ques6_group;
    RadioButton ques6_1;
    RadioButton ques6_2;
    RadioButton ques6_3;
    RadioButton ques6_4;
    RadioButton ques6_5;
    //问题七
    RadioGroup ques7_group;
    RadioButton ques7_1;
    RadioButton ques7_2;
    RadioButton ques7_3;
    RadioButton ques7_4;
    RadioButton ques7_5;
    //问题八
    RadioGroup ques8_group;
    RadioButton ques8_1;
    RadioButton ques8_2;
    RadioButton ques8_3;
    RadioButton ques8_4;
    RadioButton ques8_5;
    //问题九
    RadioGroup ques9_group;
    RadioButton ques9_1;
    RadioButton ques9_2;
    RadioButton ques9_3;
    RadioButton ques9_4;
    RadioButton ques9_5;
    //问题十
    RadioGroup ques10_group;
    RadioButton ques10_1;
    RadioButton ques10_2;
    RadioButton ques10_3;
    RadioButton ques10_4;
    RadioButton ques10_5;
    //问题十一
    RadioGroup ques11_group;
    RadioButton ques11_1;
    RadioButton ques11_2;
    RadioButton ques11_3;
    RadioButton ques11_4;
    RadioButton ques11_5;
    //问题十二
    RadioGroup ques12_group;
    RadioButton ques12_1;
    RadioButton ques12_2;
    RadioButton ques12_3;
    RadioButton ques12_4;
    RadioButton ques12_5;
    //问题十三
    RadioGroup ques13_group;
    RadioButton ques13_1;
    RadioButton ques13_2;
    RadioButton ques13_3;
    RadioButton ques13_4;
    RadioButton ques13_5;
    //问题十4
    RadioGroup ques14_group;
    RadioButton ques14_1;
    RadioButton ques14_2;
    RadioButton ques14_3;
    RadioButton ques14_4;
    RadioButton ques14_5;
    //问题十5
    RadioGroup ques15_group;
    RadioButton ques15_1;
    RadioButton ques15_2;
    RadioButton ques15_3;
    RadioButton ques15_4;
    RadioButton ques15_5;
    //问题十6
    RadioGroup ques16_group;
    RadioButton ques16_1;
    RadioButton ques16_2;
    RadioButton ques16_3;
    RadioButton ques16_4;
    RadioButton ques16_5;
    //问题十7
    RadioGroup ques17_group;
    RadioButton ques17_1;
    RadioButton ques17_2;
    RadioButton ques17_3;
    RadioButton ques17_4;
    RadioButton ques17_5;
    //问题十8
    RadioGroup ques18_group;
    RadioButton ques18_1;
    RadioButton ques18_2;
    RadioButton ques18_3;
    RadioButton ques18_4;
    RadioButton ques18_5;
    //问题十9
    RadioGroup ques19_group;
    RadioButton ques19_1;
    RadioButton ques19_2;
    RadioButton ques19_3;
    RadioButton ques19_4;
    RadioButton ques19_5;
    //问题20
    RadioGroup ques20_group;
    RadioButton ques20_1;
    RadioButton ques20_2;
    RadioButton ques20_3;
    RadioButton ques20_4;
    RadioButton ques20_5;
    //问题21
    RadioGroup ques21_group;
    RadioButton ques21_1;
    RadioButton ques21_2;
    RadioButton ques21_3;
    RadioButton ques21_4;
    RadioButton ques21_5;
    //问题22
    RadioGroup ques22_group;
    RadioButton ques22_1;
    RadioButton ques22_2;
    RadioButton ques22_3;
    RadioButton ques22_4;
    RadioButton ques22_5;
    //问题23
    RadioGroup ques23_group;
    RadioButton ques23_1;
    RadioButton ques23_2;
    RadioButton ques23_3;
    RadioButton ques23_4;
    RadioButton ques23_5;
    //问题24
    RadioGroup ques24_group;
    RadioButton ques24_1;
    RadioButton ques24_2;
    RadioButton ques24_3;
    RadioButton ques24_4;
    RadioButton ques24_5;
    //问题25
    RadioGroup ques25_group;
    RadioButton ques25_1;
    RadioButton ques25_2;
    RadioButton ques25_3;
    RadioButton ques25_4;
    RadioButton ques25_5;
    //问题26
    RadioGroup ques26_group;
    RadioButton ques26_1;
    RadioButton ques26_2;
    RadioButton ques26_3;
    RadioButton ques26_4;
    RadioButton ques26_5;
    //问题27
    RadioGroup ques27_group;
    RadioButton ques27_1;
    RadioButton ques27_2;
    RadioButton ques27_3;
    RadioButton ques27_4;
    RadioButton ques27_5;
    //问题28
    RadioGroup ques28_group;
    RadioButton ques28_1;
    RadioButton ques28_2;
    RadioButton ques28_3;
    RadioButton ques28_4;
    RadioButton ques28_5;
    //问题29
    RadioGroup ques29_group;
    RadioButton ques29_1;
    RadioButton ques29_2;
    RadioButton ques29_3;
    RadioButton ques29_4;
    RadioButton ques29_5;
    //问题30
    RadioGroup ques30_group;
    RadioButton ques30_1;
    RadioButton ques30_2;
    RadioButton ques30_3;
    RadioButton ques30_4;
    RadioButton ques30_5;
    //问题31
    RadioGroup ques31_group;
    RadioButton ques31_1;
    RadioButton ques31_2;
    RadioButton ques31_3;
    RadioButton ques31_4;
    RadioButton ques31_5;
    //问题32
    RadioGroup ques32_group;
    RadioButton ques32_1;
    RadioButton ques32_2;
    RadioButton ques32_3;
    RadioButton ques32_4;
    RadioButton ques32_5;
    //问题33
    RadioGroup ques33_group;
    RadioButton ques33_1;
    RadioButton ques33_2;
    RadioButton ques33_3;
    RadioButton ques33_4;
    RadioButton ques33_5;

    Random rand = new Random();





    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_kuaisushibie);
        findViews();
        setListeners();
    }

    @Override
    public void findViews() {
        title = (TextView) findViewById(R.id.title);
        title.setText("中医体质快速识别");
        btn_back = (Button) findViewById(R.id.btn_back);
        btn_up = (Button) findViewById(R.id.btn_up);
        btn_up.setVisibility(View.GONE);
        wenJuanButton = (Button) findViewById(R.id.wenjuan);
        resetButton = (Button) findViewById(R.id.reset);
        // RadioGroup
        pinghe = (RadioGroup) findViewById(R.id.pinghezhi_radiogroup);
        qixu = (RadioGroup) findViewById(R.id.qixuzhi_radiogroup);
        yangxu = (RadioGroup) findViewById(R.id.yangxuzhi_radiogroup);
        yinxu = (RadioGroup) findViewById(R.id.yinxuzhi_radiogroup);
        tanshi = (RadioGroup) findViewById(R.id.tanshizhi_radiogroup);
        shire = (RadioGroup) findViewById(R.id.shirezhi_radiogroup);
        xueyu = (RadioGroup) findViewById(R.id.xueyuzhi_radiogroup);
        qiyu = (RadioGroup) findViewById(R.id.qiyuzhi_radiogroup);
        tebing = (RadioGroup) findViewById(R.id.tebingzhi_radiogroup);
        // result RadioButton
        result_qixuzhi_1 = (RadioButton) findViewById(R.id.qixuzhi_1);
        result_qixuzhi_2 = (RadioButton) findViewById(R.id.qixuzhi_2);
        result_yangxuzhi_1 = (RadioButton)findViewById(R.id.yangxuzhi_1);
        result_yangxuzhi_2 = (RadioButton) findViewById(R.id.yangxuzhi_2);
        result_yinxuzhi_1 = (RadioButton) findViewById(R.id.yinxuzhi_1);
        result_yinxuzhi_2 = (RadioButton) findViewById(R.id.yinxuzhi_2);
        result_tanshizhi_1 = (RadioButton) findViewById(R.id.tanshizhi_1);
        result_tanshizhi_2 = (RadioButton) findViewById(R.id.tanshizhi_2);
        result_shirezhi_1 = (RadioButton) findViewById(R.id.shirezhi_1);
        result_shirezhi_2 = (RadioButton) findViewById(R.id.shirezhi_2);
        result_xueyuzhi_1 = (RadioButton) findViewById(R.id.xueyuzhi_1);
        result_xueyuzhi_2 = (RadioButton) findViewById(R.id.xueyuzhi_2);
        result_qiyuzhi_1 = (RadioButton) findViewById(R.id.qiyuzhi_1);
        result_qiyuzhi_2 = (RadioButton) findViewById(R.id.qiyuzhi_2);
        result_tebingzhi_1 = (RadioButton) findViewById(R.id.tebingzhi_1);
        result_tebingzhi_2 = (RadioButton) findViewById(R.id.tebingzhi_2);
        result_pinghezhi_1 = (RadioButton) findViewById(R.id.pinghezhi_1);
        result_pinghezhi_2 = (RadioButton) findViewById(R.id.pinghezhi_2);
    //  问题一
        ques1_group=findViewById(R.id.ques1_group);
        ques1_1=findViewById(R.id.ques1_1);
        ques1_2=findViewById(R.id.ques1_2);
        ques1_3=findViewById(R.id.ques1_3);
        ques1_4=findViewById(R.id.ques1_4);
        ques1_5=findViewById(R.id.ques1_5);
        //问题二
        ques2_group=findViewById(R.id.ques2_group);
        ques2_1=findViewById(R.id.ques2_1);
        ques2_2=findViewById(R.id.ques2_2);
        ques2_3=findViewById(R.id.ques2_3);
        ques2_4=findViewById(R.id.ques2_4);
        ques2_5=findViewById(R.id.ques2_5);
        //问题三
        ques3_group=findViewById(R.id.ques3_group);
        ques3_1=findViewById(R.id.ques3_1);
        ques3_2=findViewById(R.id.ques3_2);
        ques3_3=findViewById(R.id.ques3_3);
        ques3_4=findViewById(R.id.ques3_4);
        ques3_5=findViewById(R.id.ques3_5);
        //问题四
        ques4_group=findViewById(R.id.ques4_group);
        ques4_1=findViewById(R.id.ques4_1);
        ques4_2=findViewById(R.id.ques4_2);
        ques4_3=findViewById(R.id.ques4_3);
        ques4_4=findViewById(R.id.ques4_4);
        ques4_5=findViewById(R.id.ques4_5);
        //问题五
        ques5_group=findViewById(R.id.ques5_group);
        ques5_1=findViewById(R.id.ques5_1);
        ques5_2=findViewById(R.id.ques5_2);
        ques5_3=findViewById(R.id.ques5_3);
        ques5_4=findViewById(R.id.ques5_4);
        ques5_5=findViewById(R.id.ques5_5);
        //问题六
        ques6_group=findViewById(R.id.ques6_group);
        ques6_1=findViewById(R.id.ques6_1);
        ques6_2=findViewById(R.id.ques6_2);
        ques6_3=findViewById(R.id.ques6_3);
        ques6_4=findViewById(R.id.ques6_4);
        ques6_5=findViewById(R.id.ques6_5);
        //问题七
        ques7_group=findViewById(R.id.ques7_group);
        ques7_1=findViewById(R.id.ques7_1);
        ques7_2=findViewById(R.id.ques7_2);
        ques7_3=findViewById(R.id.ques7_3);
        ques7_4=findViewById(R.id.ques7_4);
        ques7_5=findViewById(R.id.ques7_5);
        //问题八
        ques8_group=findViewById(R.id.ques8_group);
        ques8_1=findViewById(R.id.ques8_1);
        ques8_2=findViewById(R.id.ques8_2);
        ques8_3=findViewById(R.id.ques8_3);
        ques8_4=findViewById(R.id.ques8_4);
        ques8_5=findViewById(R.id.ques8_5);
        //问题九
        ques9_group=findViewById(R.id.ques9_group);
        ques9_1=findViewById(R.id.ques9_1);
        ques9_2=findViewById(R.id.ques9_2);
        ques9_3=findViewById(R.id.ques9_3);
        ques9_4=findViewById(R.id.ques9_4);
        ques9_5=findViewById(R.id.ques9_5);
        //问题十
        ques10_group=findViewById(R.id.ques10_group);
        ques10_1=findViewById(R.id.ques10_1);
        ques10_2=findViewById(R.id.ques10_2);
        ques10_3=findViewById(R.id.ques10_3);
        ques10_4=findViewById(R.id.ques10_4);
        ques10_5=findViewById(R.id.ques10_5);
        //问题十一
        ques11_group=findViewById(R.id.ques11_group);
        ques11_1=findViewById(R.id.ques11_1);
        ques11_2=findViewById(R.id.ques11_2);
        ques11_3=findViewById(R.id.ques11_3);
        ques11_4=findViewById(R.id.ques11_4);
        ques11_5=findViewById(R.id.ques11_5);
        //问题十二
        ques12_group=findViewById(R.id.ques12_group);
        ques12_1=findViewById(R.id.ques12_1);
        ques12_2=findViewById(R.id.ques12_2);
        ques12_3=findViewById(R.id.ques12_3);
        ques12_4=findViewById(R.id.ques12_4);
        ques12_5=findViewById(R.id.ques12_5);
        //问题十三
        ques13_group=findViewById(R.id.ques13_group);
        ques13_1=findViewById(R.id.ques13_1);
        ques13_2=findViewById(R.id.ques13_2);
        ques13_3=findViewById(R.id.ques13_3);
        ques13_4=findViewById(R.id.ques13_4);
        ques13_5=findViewById(R.id.ques13_5);
        //问题十4
        ques14_group=findViewById(R.id.ques14_group);
        ques14_1=findViewById(R.id.ques14_1);
        ques14_2=findViewById(R.id.ques14_2);
        ques14_3=findViewById(R.id.ques14_3);
        ques14_4=findViewById(R.id.ques14_4);
        ques14_5=findViewById(R.id.ques14_5);
        //问题十5
        ques15_group=findViewById(R.id.ques15_group);
        ques15_1=findViewById(R.id.ques15_1);
        ques15_2=findViewById(R.id.ques15_2);
        ques15_3=findViewById(R.id.ques15_3);
        ques15_4=findViewById(R.id.ques15_4);
        ques15_5=findViewById(R.id.ques15_5);
        //问题十6
        ques16_group=findViewById(R.id.ques16_group);
        ques16_1=findViewById(R.id.ques16_1);
        ques16_2=findViewById(R.id.ques16_2);
        ques16_3=findViewById(R.id.ques16_3);
        ques16_4=findViewById(R.id.ques16_4);
        ques16_5=findViewById(R.id.ques16_5);
        //问题十7
        ques17_group=findViewById(R.id.ques17_group);
        ques17_1=findViewById(R.id.ques17_1);
        ques17_2=findViewById(R.id.ques17_2);
        ques17_3=findViewById(R.id.ques17_3);
        ques17_4=findViewById(R.id.ques17_4);
        ques17_5=findViewById(R.id.ques17_5);
        //问题十8
        ques18_group=findViewById(R.id.ques18_group);
        ques18_1=findViewById(R.id.ques18_1);
        ques18_2=findViewById(R.id.ques18_2);
        ques18_3=findViewById(R.id.ques18_3);
        ques18_4=findViewById(R.id.ques18_4);
        ques18_5=findViewById(R.id.ques18_5);
        //问题十9
        ques19_group=findViewById(R.id.ques19_group);
        ques19_1=findViewById(R.id.ques19_1);
        ques19_2=findViewById(R.id.ques19_2);
        ques19_3=findViewById(R.id.ques19_3);
        ques19_4=findViewById(R.id.ques19_4);
        ques19_5=findViewById(R.id.ques19_5);
        //问题20
        ques20_group=findViewById(R.id.ques20_group);
        ques20_1=findViewById(R.id.ques20_1);
        ques20_2=findViewById(R.id.ques20_2);
        ques20_3=findViewById(R.id.ques20_3);
        ques20_4=findViewById(R.id.ques20_4);
        ques20_5=findViewById(R.id.ques20_5);
        //问题21
        ques21_group=findViewById(R.id.ques21_group);
        ques21_1=findViewById(R.id.ques21_1);
        ques21_2=findViewById(R.id.ques21_2);
        ques21_3=findViewById(R.id.ques21_3);
        ques21_4=findViewById(R.id.ques21_4);
        ques21_5=findViewById(R.id.ques21_5);
        //问题22
        ques22_group=findViewById(R.id.ques22_group);
        ques22_1=findViewById(R.id.ques22_1);
        ques22_2=findViewById(R.id.ques22_2);
        ques22_3=findViewById(R.id.ques22_3);
        ques22_4=findViewById(R.id.ques22_4);
        ques22_5=findViewById(R.id.ques22_5);
        //问题23
        ques23_group=findViewById(R.id.ques23_group);
        ques23_1=findViewById(R.id.ques23_1);
        ques23_2=findViewById(R.id.ques23_2);
        ques23_3=findViewById(R.id.ques23_3);
        ques23_4=findViewById(R.id.ques23_4);
        ques23_5=findViewById(R.id.ques23_5);
        //问题24
        ques24_group=findViewById(R.id.ques24_group);
        ques24_1=findViewById(R.id.ques24_1);
        ques24_2=findViewById(R.id.ques24_2);
        ques24_3=findViewById(R.id.ques24_3);
        ques24_4=findViewById(R.id.ques24_4);
        ques24_5=findViewById(R.id.ques24_5);
        //问题25
        ques25_group=findViewById(R.id.ques25_group);
        ques25_1=findViewById(R.id.ques25_1);
        ques25_2=findViewById(R.id.ques25_2);
        ques25_3=findViewById(R.id.ques25_3);
        ques25_4=findViewById(R.id.ques25_4);
        ques25_5=findViewById(R.id.ques25_5);
        //问题26
        ques26_group=findViewById(R.id.ques26_group);
        ques26_1=findViewById(R.id.ques26_1);
        ques26_2=findViewById(R.id.ques26_2);
        ques26_3=findViewById(R.id.ques26_3);
        ques26_4=findViewById(R.id.ques26_4);
        ques26_5=findViewById(R.id.ques26_5);
        //问题27
        ques27_group=findViewById(R.id.ques27_group);
        ques27_1=findViewById(R.id.ques27_1);
        ques27_2=findViewById(R.id.ques27_2);
        ques27_3=findViewById(R.id.ques27_3);
        ques27_4=findViewById(R.id.ques27_4);
        ques27_5=findViewById(R.id.ques27_5);
        //问题28
        ques28_group=findViewById(R.id.ques28_group);
        ques28_1=findViewById(R.id.ques28_1);
        ques28_2=findViewById(R.id.ques28_2);
        ques28_3=findViewById(R.id.ques28_3);
        ques28_4=findViewById(R.id.ques28_4);
        ques28_5=findViewById(R.id.ques28_5);
        //问题29
        ques29_group=findViewById(R.id.ques29_group);
        ques29_1=findViewById(R.id.ques29_1);
        ques29_2=findViewById(R.id.ques29_2);
        ques29_3=findViewById(R.id.ques29_3);
        ques29_4=findViewById(R.id.ques29_4);
        ques29_5=findViewById(R.id.ques29_5);
        //问题30
        ques30_group=findViewById(R.id.ques30_group);
        ques30_1=findViewById(R.id.ques30_1);
        ques30_2=findViewById(R.id.ques30_2);
        ques30_3=findViewById(R.id.ques30_3);
        ques30_4=findViewById(R.id.ques30_4);
        ques30_5=findViewById(R.id.ques30_5);
        //问题31
        ques31_group=findViewById(R.id.ques31_group);
        ques31_1=findViewById(R.id.ques31_1);
        ques31_2=findViewById(R.id.ques31_2);
        ques31_3=findViewById(R.id.ques31_3);
        ques31_4=findViewById(R.id.ques31_4);
        ques31_5=findViewById(R.id.ques31_5);
        //问题32
        ques32_group=findViewById(R.id.ques32_group);
        ques32_1=findViewById(R.id.ques32_1);
        ques32_2=findViewById(R.id.ques32_2);
        ques32_3=findViewById(R.id.ques32_3);
        ques32_4=findViewById(R.id.ques32_4);
        ques32_5=findViewById(R.id.ques32_5);
        //问题33
        ques33_group=findViewById(R.id.ques33_group);
        ques33_1=findViewById(R.id.ques33_1);
        ques33_2=findViewById(R.id.ques33_2);
        ques33_3=findViewById(R.id.ques33_3);
        ques33_4=findViewById(R.id.ques33_4);
        ques33_5=findViewById(R.id.ques33_5);

    }

    @Override
    public void setListeners() {
        btn_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        wenJuanButton.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                setQuestion();
            }
        });
        pinghe.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(RadioGroup group, int checkedId) {
                if(R.id.pinghezhi_1==checkedId){

                    qixu.clearCheck();
                    yangxu.clearCheck();
                    yinxu.clearCheck();
                    tanshi.clearCheck();
                    shire.clearCheck();
                    xueyu.clearCheck();
                    qiyu.clearCheck();
                    tebing.clearCheck();
//                    Toast.makeText(KuaiSuShiBieActivity.this,"平和质与其他体质不能同时存在",Toast.LENGTH_SHORT).show();

                }else if(R.id.pinghezhi_2==checkedId){
                    result_qixuzhi_1.setChecked(false);
                    result_yangxuzhi_1.setChecked(false);
                    result_yinxuzhi_1.setChecked(false);
                    result_tanshizhi_1.setChecked(false);
                    result_shirezhi_1.setChecked(false);
                    result_xueyuzhi_1.setChecked(false);
                    result_qiyuzhi_1.setChecked(false);
                    result_tebingzhi_1.setChecked(false);
//                    Toast.makeText(KuaiSuShiBieActivity.this,"基本是平和质与其他体质不能同时存在",Toast.LENGTH_SHORT).show();

                }
            }
        });
        qixu.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(RadioGroup group, int checkedId) {
                if(R.id.qixuzhi_1==checkedId){
                    pinghe.clearCheck();
                }else if(R.id.qixuzhi_2==checkedId){
                    result_pinghezhi_1.setChecked(false);
                }
            }
        });
        yangxu.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(RadioGroup group, int checkedId) {
                if(R.id.yangxuzhi_1==checkedId){
                    pinghe.clearCheck();
                }else if(R.id.yangxuzhi_2==checkedId){
                    result_pinghezhi_1.setChecked(false);
                }
            }
        });

        yinxu.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(RadioGroup group, int checkedId) {
                if(R.id.yinxuzhi_1==checkedId){
                    pinghe.clearCheck();
                }else if(R.id.yinxuzhi_2==checkedId){
                    result_pinghezhi_1.setChecked(false);
                }
            }
        });
        tanshi.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(RadioGroup group, int checkedId) {
                if(R.id.tanshizhi_1==checkedId){
                    pinghe.clearCheck();
                }else if(R.id.tanshizhi_2==checkedId){
                    result_pinghezhi_1.setChecked(false);
                }
            }
        });
        shire.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(RadioGroup group, int checkedId) {
                if(R.id.shirezhi_1==checkedId){
                    pinghe.clearCheck();
                }else if(R.id.shirezhi_2==checkedId){
                    result_pinghezhi_1.setChecked(false);
                }
            }
        });
        xueyu.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(RadioGroup group, int checkedId) {
                if(R.id.xueyuzhi_1==checkedId){
                    pinghe.clearCheck();
                }else if(R.id.xueyuzhi_2==checkedId){
                    result_pinghezhi_1.setChecked(false);
                }
            }
        });
        qiyu.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(RadioGroup group, int checkedId) {
                if(R.id.qiyuzhi_1==checkedId){
                    pinghe.clearCheck();
                }else if(R.id.qiyuzhi_2==checkedId){
                    result_pinghezhi_1.setChecked(false);
                }
            }
        });
        tebing.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(RadioGroup group, int checkedId) {
                if(R.id.tebingzhi_1==checkedId){
                    pinghe.clearCheck();
                }else if(R.id.tebingzhi_2==checkedId){
                    result_pinghezhi_1.setChecked(false);
                }
            }
        });
        resetButton.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                pinghe.clearCheck();
                qixu.clearCheck();
                yangxu.clearCheck();
                yinxu.clearCheck();
                tanshi.clearCheck();
                shire.clearCheck();
                xueyu.clearCheck();
                qiyu.clearCheck();
                tebing.clearCheck();
                ques1_group.clearCheck();
                ques2_group.clearCheck();
                ques3_group.clearCheck();
                ques4_group.clearCheck();
                ques5_group.clearCheck();
                ques6_group.clearCheck();
                ques7_group.clearCheck();
                ques8_group.clearCheck();
                ques9_group.clearCheck();
                ques10_group.clearCheck();
                ques11_group.clearCheck();
                ques12_group.clearCheck();
                ques13_group.clearCheck();
                ques14_group.clearCheck();
                ques15_group.clearCheck();
                ques16_group.clearCheck();
                ques17_group.clearCheck();
                ques18_group.clearCheck();
                ques19_group.clearCheck();
                ques20_group.clearCheck();
                ques21_group.clearCheck();
                ques22_group.clearCheck();
                ques23_group.clearCheck();
                ques24_group.clearCheck();
                ques25_group.clearCheck();
                ques26_group.clearCheck();
                ques27_group.clearCheck();
                ques28_group.clearCheck();
                ques29_group.clearCheck();
                ques30_group.clearCheck();
                ques31_group.clearCheck();
                ques32_group.clearCheck();
                ques33_group.clearCheck();
            }
        });
    }

    public void setQuestion(){
        ques1_group.clearCheck();
        ques2_group.clearCheck();
        ques3_group.clearCheck();
        ques4_group.clearCheck();
        ques5_group.clearCheck();
        ques6_group.clearCheck();
        ques7_group.clearCheck();
        ques8_group.clearCheck();
        ques9_group.clearCheck();
        ques10_group.clearCheck();
        ques11_group.clearCheck();
        ques12_group.clearCheck();
        ques13_group.clearCheck();
        ques14_group.clearCheck();
        ques15_group.clearCheck();
        ques16_group.clearCheck();
        ques17_group.clearCheck();
        ques18_group.clearCheck();
        ques19_group.clearCheck();
        ques20_group.clearCheck();
        ques21_group.clearCheck();
        ques22_group.clearCheck();
        ques23_group.clearCheck();
        ques24_group.clearCheck();
        ques25_group.clearCheck();
        ques26_group.clearCheck();
        ques27_group.clearCheck();
        ques28_group.clearCheck();
        ques29_group.clearCheck();
        ques30_group.clearCheck();
        ques31_group.clearCheck();
        ques32_group.clearCheck();
        ques33_group.clearCheck();

        int ques1=0;
        int ques2=0;
        int ques3=0;
        int ques4=0;
        int ques5=0;
        if(result_qixuzhi_1.isChecked()){
          for(int i=0;i<10000;i++){
              ques1=rand.nextInt(5)+1;
              ques2=rand.nextInt(5)+1;
              ques3=rand.nextInt(5)+1;
              ques4=rand.nextInt(5)+1;

              if(ques1+ques2+ques3+ques4>=11){
                  setQues2selected(ques1);
                  setQues3selected(ques2);
                  setQues4selected(ques3);
                 setQues14selected(ques4);
                  break;
              }

          }


        }else if(result_qixuzhi_2.isChecked()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4>=9&&ques1+ques2+ques3+ques4<=10){
                    setQues2selected(ques1);
                    setQues3selected(ques2);
                    setQues4selected(ques3);
                    setQues14selected(ques4);
                    break;
                }

            }
        }else{
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4<=8){
                    setQues2selected(ques1);
                    setQues3selected(ques2);
                    setQues4selected(ques3);
                    setQues14selected(ques4);
                    break;
                }

            }
        }
        if(result_yangxuzhi_1.isChecked()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4>=11){
                    setQues11selected(ques1);
                    setQues12selected(ques2);
                    setQues13selected(ques3);
                    setQues29selected(ques4);
                    break;
                }

            }


        }else if(result_yangxuzhi_2.isChecked()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4>=9&&ques1+ques2+ques3+ques4<=10){
                    setQues11selected(ques1);
                    setQues12selected(ques2);
                    setQues13selected(ques3);
                    setQues29selected(ques4);
                    break;
                }

            }
        }else{
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4<=8){
                    setQues11selected(ques1);
                    setQues12selected(ques2);
                    setQues13selected(ques3);
                    setQues29selected(ques4);
                    break;
                }

            }
        }
        if(result_yinxuzhi_1.isChecked()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4>=11){
                    setQues10selected(ques1);
                    setQues21selected(ques2);
                    setQues26selected(ques3);
                    setQues31selected(ques4);
                    break;
                }

            }


        }else if(result_yinxuzhi_2.isChecked()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4>=9&&ques1+ques2+ques3+ques4<=10){
                    setQues10selected(ques1);
                    setQues21selected(ques2);
                    setQues26selected(ques3);
                    setQues31selected(ques4);
                    break;
                }

            }
        }else{
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4<=8){
                    setQues10selected(ques1);
                    setQues21selected(ques2);
                    setQues26selected(ques3);
                    setQues31selected(ques4);
                    break;
                }

            }
        }
        if(result_tanshizhi_1.isChecked()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4>=11){
                    setQues9selected(ques1);
                    setQues16selected(ques2);
                    setQues28selected(ques3);
                    setQues32selected(ques4);
                    break;
                }

            }


        }else if(result_tanshizhi_2.isChecked()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4>=9&&ques1+ques2+ques3+ques4<=10){
                    setQues9selected(ques1);
                    setQues16selected(ques2);
                    setQues28selected(ques3);
                    setQues32selected(ques4);
                    break;
                }

            }
        }else{
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4<=8){
                    setQues9selected(ques1);
                    setQues16selected(ques2);
                    setQues28selected(ques3);
                    setQues32selected(ques4);
                    break;
                }

            }
        }
        if(result_shirezhi_1.isChecked()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4>=11){
                    setQues23selected(ques1);
                    setQues25selected(ques2);
                    setQues27selected(ques3);
                    setQues30selected(ques4);
                    break;
                }

            }


        }else if(result_shirezhi_2.isChecked()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4>=9&&ques1+ques2+ques3+ques4<=10){
                    setQues23selected(ques1);
                    setQues25selected(ques2);
                    setQues27selected(ques3);
                    setQues30selected(ques4);
                    break;
                }

            }
        }else{
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4<=8){
                    setQues23selected(ques1);
                    setQues25selected(ques2);
                    setQues27selected(ques3);
                    setQues30selected(ques4);
                    break;
                }

            }
        }
        if(result_xueyuzhi_1.isChecked()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4>=11){
                    setQues19selected(ques1);
                    setQues22selected(ques2);
                    setQues24selected(ques3);
                    setQues33selected(ques4);
                    break;
                }

            }


        }else if(result_xueyuzhi_2.isChecked()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4>=9&&ques1+ques2+ques3+ques4<=10){
                    setQues19selected(ques1);
                    setQues22selected(ques2);
                    setQues24selected(ques3);
                    setQues33selected(ques4);
                    break;
                }

            }
        }else{
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4<=8){
                    setQues19selected(ques1);
                    setQues22selected(ques2);
                    setQues24selected(ques3);
                    setQues33selected(ques4);
                    break;
                }

            }
        }
        if(result_qiyuzhi_1.isChecked()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4>=11){
                    setQues5selected(ques1);
                    setQues6selected(ques2);
                    setQues7selected(ques3);
                    setQues8selected(ques4);
                    break;
                }

            }


        }else if(result_qiyuzhi_2.isChecked()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4>=9&&ques1+ques2+ques3+ques4<=10){
                    setQues5selected(ques1);
                    setQues6selected(ques2);
                    setQues7selected(ques3);
                    setQues8selected(ques4);
                    break;
                }

            }
        }else{
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4<=8){
                    setQues5selected(ques1);
                    setQues6selected(ques2);
                    setQues7selected(ques3);
                    setQues8selected(ques4);
                    break;
                }

            }
        }
        if(result_tebingzhi_1.isChecked()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4>=11){
                    setQues15selected(ques1);
                    setQues17selected(ques2);
                    setQues18selected(ques3);
                    setQues20selected(ques4);
                    break;
                }

            }


        }else if(result_tebingzhi_2.isChecked()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4>=9&&ques1+ques2+ques3+ques4<=10){
                    setQues15selected(ques1);
                    setQues17selected(ques2);
                    setQues18selected(ques3);
                    setQues20selected(ques4);
                    break;
                }

            }
        }else{
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;

                if(ques1+ques2+ques3+ques4<=8){
                    setQues15selected(ques1);
                    setQues17selected(ques2);
                    setQues18selected(ques3);
                    setQues20selected(ques4);
                    break;
                }

            }
        }

        if(pinghe.isSelected()){
            for(int i=0;i<10000;i++){
                ques1=rand.nextInt(5)+1;
                ques2=rand.nextInt(5)+1;
                ques3=rand.nextInt(5)+1;
                ques4=rand.nextInt(5)+1;
                ques5=rand.nextInt(5)+1;

                if(ques1+6-ques2+6-ques3+6-ques4+6-ques5>=17){
                    setQues1selected(ques1);
                    setQues2selected(ques2);
                    setQues4selected(ques3);
                    setQues5selected(ques4);
                    setQues13selected(ques5);
                    break;
                }

            }
        }else{
            ques1=rand.nextInt(5)+1;
            setQues1selected(ques1);

        }



    }

    public void setQues1selected(int index){
       if(index==1){
          ques1_1.setChecked(true);
       }else if(index==2){
           ques1_2.setChecked(true);
       }else if(index==3){
           ques1_3.setChecked(true);
       }else if(index==4){
           ques1_4.setChecked(true);
       }else if(index==5){
           ques1_5.setChecked(true);
       }
    }
    public void setQues2selected(int index){
        if(index==1){
            ques2_1.setChecked(true);
        }else if(index==2){
            ques2_2.setChecked(true);
        }else if(index==3){
            ques2_3.setChecked(true);
        }else if(index==4){
            ques2_4.setChecked(true);
        }else if(index==5){
            ques2_5.setChecked(true);
        }
    }
    public void setQues3selected(int index){
        if(index==1){
            ques3_1.setChecked(true);
        }else if(index==2){
            ques3_2.setChecked(true);
        }else if(index==3){
            ques3_3.setChecked(true);
        }else if(index==4){
            ques3_4.setChecked(true);
        }else if(index==5){
            ques3_5.setChecked(true);
        }
    }
    public void setQues4selected(int index){
        if(index==1){
            ques4_1.setChecked(true);
        }else if(index==2){
            ques4_2.setChecked(true);
        }else if(index==3){
            ques4_3.setChecked(true);
        }else if(index==4){
            ques4_4.setChecked(true);
        }else if(index==5){
            ques4_5.setChecked(true);
        }
    }
    public void setQues5selected(int index){
        if(index==1){
            ques5_1.setChecked(true);
        }else if(index==2){
            ques5_2.setChecked(true);
        }else if(index==3){
            ques5_3.setChecked(true);
        }else if(index==4){
            ques5_4.setChecked(true);
        }else if(index==5){
            ques5_5.setChecked(true);
        }
    }
    public void setQues6selected(int index){
        if(index==1){
            ques6_1.setChecked(true);
        }else if(index==2){
            ques6_2.setChecked(true);
        }else if(index==3){
            ques6_3.setChecked(true);
        }else if(index==4){
            ques6_4.setChecked(true);
        }else if(index==5){
            ques6_5.setChecked(true);
        }
    }
    public void setQues7selected(int index){
        if(index==1){
            ques7_1.setChecked(true);
        }else if(index==2){
            ques7_2.setChecked(true);
        }else if(index==3){
            ques7_3.setChecked(true);
        }else if(index==4){
            ques7_4.setChecked(true);
        }else if(index==5){
            ques7_5.setChecked(true);
        }
    }
    public void setQues8selected(int index){
        if(index==1){
            ques8_1.setChecked(true);
        }else if(index==2){
            ques8_2.setChecked(true);
        }else if(index==3){
            ques8_3.setChecked(true);
        }else if(index==4){
            ques8_4.setChecked(true);
        }else if(index==5){
            ques8_5.setChecked(true);
        }
    }
    public void setQues9selected(int index){
        if(index==1){
            ques9_1.setChecked(true);
        }else if(index==2){
            ques9_2.setChecked(true);
        }else if(index==3){
            ques9_3.setChecked(true);
        }else if(index==4){
            ques9_4.setChecked(true);
        }else if(index==5){
            ques9_5.setChecked(true);
        }
    }
    public void setQues10selected(int index){
        if(index==1){
            ques10_1.setChecked(true);
        }else if(index==2){
            ques10_2.setChecked(true);
        }else if(index==3){
            ques10_3.setChecked(true);
        }else if(index==4){
            ques10_4.setChecked(true);
        }else if(index==5){
            ques10_5.setChecked(true);
        }
    }
    public void setQues11selected(int index){
        if(index==1){
            ques11_1.setChecked(true);
        }else if(index==2){
            ques11_2.setChecked(true);
        }else if(index==3){
            ques11_3.setChecked(true);
        }else if(index==4){
            ques11_4.setChecked(true);
        }else if(index==5){
            ques11_5.setChecked(true);
        }
    }
    public void setQues12selected(int index){
        if(index==1){
            ques12_1.setChecked(true);
        }else if(index==2){
            ques12_2.setChecked(true);
        }else if(index==3){
            ques12_3.setChecked(true);
        }else if(index==4){
            ques12_4.setChecked(true);
        }else if(index==5){
            ques12_5.setChecked(true);
        }
    }
    public void setQues13selected(int index){
        if(index==1){
            ques13_1.setChecked(true);
        }else if(index==2){
            ques13_2.setChecked(true);
        }else if(index==3){
            ques13_3.setChecked(true);
        }else if(index==4){
            ques13_4.setChecked(true);
        }else if(index==5){
            ques13_5.setChecked(true);
        }
    }
    public void setQues14selected(int index){
        if(index==1){
            ques14_1.setChecked(true);
        }else if(index==2){
            ques14_2.setChecked(true);
        }else if(index==3){
            ques14_3.setChecked(true);
        }else if(index==4){
            ques14_4.setChecked(true);
        }else if(index==5){
            ques14_5.setChecked(true);
        }
    }
    public void setQues15selected(int index){
        if(index==1){
            ques15_1.setChecked(true);
        }else if(index==2){
            ques15_2.setChecked(true);
        }else if(index==3){
            ques15_3.setChecked(true);
        }else if(index==4){
            ques15_4.setChecked(true);
        }else if(index==5){
            ques15_5.setChecked(true);
        }
    }
    public void setQues16selected(int index){
        if(index==1){
            ques16_1.setChecked(true);
        }else if(index==2){
            ques16_2.setChecked(true);
        }else if(index==3){
            ques16_3.setChecked(true);
        }else if(index==4){
            ques16_4.setChecked(true);
        }else if(index==5){
            ques16_5.setChecked(true);
        }
    }
    public void setQues17selected(int index){
        if(index==1){
            ques17_1.setChecked(true);
        }else if(index==2){
            ques17_2.setChecked(true);
        }else if(index==3){
            ques17_3.setChecked(true);
        }else if(index==4){
            ques17_4.setChecked(true);
        }else if(index==5){
            ques17_5.setChecked(true);
        }
    }
    public void setQues18selected(int index){
        if(index==1){
            ques18_1.setChecked(true);
        }else if(index==2){
            ques18_2.setChecked(true);
        }else if(index==3){
            ques18_3.setChecked(true);
        }else if(index==4){
            ques18_4.setChecked(true);
        }else if(index==5){
            ques18_5.setChecked(true);
        }
    }
    public void setQues19selected(int index){
        if(index==1){
            ques19_1.setChecked(true);
        }else if(index==2){
            ques19_2.setChecked(true);
        }else if(index==3){
            ques19_3.setChecked(true);
        }else if(index==4){
            ques19_4.setChecked(true);
        }else if(index==5){
            ques19_5.setChecked(true);
        }
    }
    public void setQues20selected(int index){
        if(index==1){
            ques20_1.setChecked(true);
        }else if(index==2){
            ques20_2.setChecked(true);
        }else if(index==3){
            ques20_3.setChecked(true);
        }else if(index==4){
            ques20_4.setChecked(true);
        }else if(index==5){
            ques20_5.setChecked(true);
        }
    }
    public void setQues21selected(int index){
        if(index==1){
            ques21_1.setChecked(true);
        }else if(index==2){
            ques21_2.setChecked(true);
        }else if(index==3){
            ques21_3.setChecked(true);
        }else if(index==4){
            ques21_4.setChecked(true);
        }else if(index==5){
            ques21_5.setChecked(true);
        }
    }
    public void setQues22selected(int index){
        if(index==1){
            ques22_1.setChecked(true);
        }else if(index==2){
            ques22_2.setChecked(true);
        }else if(index==3){
            ques22_3.setChecked(true);
        }else if(index==4){
            ques22_4.setChecked(true);
        }else if(index==5){
            ques22_5.setChecked(true);
        }
    }
    public void setQues23selected(int index){
        if(index==1){
            ques23_1.setChecked(true);
        }else if(index==2){
            ques23_2.setChecked(true);
        }else if(index==3){
            ques23_3.setChecked(true);
        }else if(index==4){
            ques23_4.setChecked(true);
        }else if(index==5){
            ques23_5.setChecked(true);
        }
    }
    public void setQues24selected(int index){
        if(index==1){
            ques24_1.setChecked(true);
        }else if(index==2){
            ques24_2.setChecked(true);
        }else if(index==3){
            ques24_3.setChecked(true);
        }else if(index==4){
            ques24_4.setChecked(true);
        }else if(index==5){
            ques24_5.setChecked(true);
        }
    }
    public void setQues25selected(int index){
        if(index==1){
            ques25_1.setChecked(true);
        }else if(index==2){
            ques25_2.setChecked(true);
        }else if(index==3){
            ques25_3.setChecked(true);
        }else if(index==4){
            ques25_4.setChecked(true);
        }else if(index==5){
            ques25_5.setChecked(true);
        }
    }
    public void setQues26selected(int index){
        if(index==1){
            ques26_1.setChecked(true);
        }else if(index==2){
            ques26_2.setChecked(true);
        }else if(index==3){
            ques26_3.setChecked(true);
        }else if(index==4){
            ques26_4.setChecked(true);
        }else if(index==5){
            ques26_5.setChecked(true);
        }
    }
    public void setQues27selected(int index){
        if(index==1){
            ques27_1.setChecked(true);
        }else if(index==2){
            ques27_2.setChecked(true);
        }else if(index==3){
            ques27_3.setChecked(true);
        }else if(index==4){
            ques27_4.setChecked(true);
        }else if(index==5){
            ques17_5.setChecked(true);
        }
    }
    public void setQues28selected(int index){
        if(index==1){
            ques28_1.setChecked(true);
        }else if(index==2){
            ques28_2.setChecked(true);
        }else if(index==3){
            ques28_3.setChecked(true);
        }else if(index==4){
            ques28_4.setChecked(true);
        }else if(index==5){
            ques28_5.setChecked(true);
        }
    }
    public void setQues29selected(int index){
        if(index==1){
            ques29_1.setChecked(true);
        }else if(index==2){
            ques29_2.setChecked(true);
        }else if(index==3){
            ques29_3.setChecked(true);
        }else if(index==4){
            ques29_4.setChecked(true);
        }else if(index==5){
            ques29_5.setChecked(true);
        }
    }
    public void setQues30selected(int index){
        if(index==1){
            ques30_1.setChecked(true);
        }else if(index==2){
            ques30_2.setChecked(true);
        }else if(index==3){
            ques30_3.setChecked(true);
        }else if(index==4){
            ques30_4.setChecked(true);
        }else if(index==5){
            ques30_5.setChecked(true);
        }
    }
    public void setQues31selected(int index){
        if(index==1){
            ques31_1.setChecked(true);
        }else if(index==2){
            ques31_2.setChecked(true);
        }else if(index==3){
            ques31_3.setChecked(true);
        }else if(index==4){
            ques31_4.setChecked(true);
        }else if(index==5){
            ques31_5.setChecked(true);
        }
    }
    public void setQues32selected(int index){
        if(index==1){
            ques32_1.setChecked(true);
        }else if(index==2){
            ques32_2.setChecked(true);
        }else if(index==3){
            ques32_3.setChecked(true);
        }else if(index==4){
            ques32_4.setChecked(true);
        }else if(index==5){
            ques32_5.setChecked(true);
        }
    }
    public void setQues33selected(int index){
        if(index==1){
            ques33_1.setChecked(true);
        }else if(index==2){
            ques33_2.setChecked(true);
        }else if(index==3){
            ques33_3.setChecked(true);
        }else if(index==4){
            ques33_4.setChecked(true);
        }else if(index==5){
            ques33_5.setChecked(true);
        }
    }

}
